local log       = require "bw.log"
local errcode   = require "def.errcode"
local check     = require "check_gate"

return function()
    check.api("/user/sign_in", {}, errcode.ARGS_ERROR)
    check.api("/user/ping", {}, errcode.AUTH_FAIL)
    local ret = check.api("/user/sign_in", {acc = "test"})
    local authorization = ret.authorization
    check.api("/user/ping", {}, nil, authorization)
    log.debug("ok")
    return true
end
